package com.lovo.order.controller;


import com.lovo.dto.OrderDto;
import com.lovo.order.dao.IOrderDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Description:
 *
 * @author LiuChengQi
 * @date Created on 2020/11/30
 */
@RestController
public class OrderController {
    @Autowired
    private IOrderDao orderDao;

    @PostMapping("/three")
    public void update3(@RequestBody OrderDto dto){
        System.out.println(3);
        System.out.println(dto.getOrderNum());
        orderDao.updateOrderTothree(dto.getOrderNum());
    }
    @PostMapping
    public void update2(@RequestBody OrderDto dto){
        System.out.println(2);
        System.out.println(dto.getOrderNum());
        orderDao.updateOrderTotwo(dto.getOrderNum());
    }


}



